﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DerptelligenceSite.Areas.Marein.Models.Blog
{
	public class BlogLayout {

		public static String OpenDiv( String classname, BlogTopic topic )
		{
			if ( topic != null )
			{
				return "<div class=\"" + classname + "_TOPIC" + topic.shortTitle + "\">";
			}
			else
			{
				return "<div class=\"" + classname + "\">";
			}
		}

		public static String CloseDiv()
		{
			return "</div>";
		}

		public static String OpenDoubleDiv( String classname, BlogTopic topic )
		{
			if ( topic != null )
			{
				return "<div class=\"" + classname + "_outer_TOPIC" + topic.shortTitle + "\"><div class=\"" + classname + "_inner_TOPIC" + topic.shortTitle + "\">";
			}
			else
			{
				return "<div class=\"" + classname + "_outer\"><div class=\"" + classname + "_inner\">";
			}
		}

		public static String CloseDoubleDiv()
		{
			return "</div></div>";
		}

		//public static String OpenDoubleDiv( String classname, String style_outer = "", String style_inner = "" )
		//{
		//    if ( String.IsNullOrEmpty( style_outer ) && String.IsNullOrEmpty( style_inner ) )
		//    {
		//        return "<div class=\"" + classname + "_outer\"><div class=\"" + classname + "_inner\">";
		//    }
		//    else
		//    {
		//        return "<div class=\"" + classname + "_outer\" style=\"" + style_outer + "\"><div class=\"" + classname + "_inner\" style=\"" + style_inner + "\">";
		//    }
		//}

		//public static String CloseDoubleDiv( String classname )
		//{
		//    return "</div class=\"" + classname + "_inner\"></div class=\"" + classname + "_outer\">";
		//}

		//public static String DivTopic( BlogTopic topic )
		//{
		//    return "_TOPIC" + topic.shortTitle;
		//}

		//public static String TopicColourStyle( String background = "", String border = "", String text = "" )
		//{
		//    String backgroundcolor = "";
		//    String bordercolor = "";
		//    String color = "";

		//    if ( !String.IsNullOrEmpty( background ) )
		//    {
		//        backgroundcolor = "background-color:" + background + ";";
		//    }

		//    if ( !String.IsNullOrEmpty( border ) )
		//    {
		//        bordercolor = "border-color:" + border + ";";
		//    }

		//    if ( !String.IsNullOrEmpty( text ) )
		//    {
		//        color = "color:" + text + ";";
		//    }

		//    return backgroundcolor + bordercolor + color;
		//}
	}
}